package fr.afcepf.ai89.esharing.data;

import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import fr.afcepf.ai89.esharing.entity.MotivationAnnulation;
import fr.afcepf.ai89.esharing.entity.MotivationRefus;

@Stateless
public class DAOMotivationRefus implements IDAOMotivationRefus {

	@PersistenceContext(unitName = "ESharingPhase22")
	EntityManager em;

	@Override
	public MotivationRefus getMotRefus(int idMotRefus) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<MotivationRefus> getMotsRefuss() {
		
		Query hql = em.createQuery("SELECT mr FROM MotivationRefus mr");

		List<MotivationRefus> listeMr = (List<MotivationRefus>)hql.getResultList();
		
		return listeMr;

	}

	@Override
	public int addMotRefus(MotivationRefus motRefus) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int majMotRefus(MotivationRefus motRefus) {
		// TODO Auto-generated method stub
		return 0;
	}

}
